﻿/*using Project.BLL.information;
using Project.BLL.SignInBll;
using Project.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
using Project.API.Models.UsersModels;

namespace Project.API.Controllers.UsersInfoController
{
    public class SignInController : ApiController
    {
        // GET: api/SignIn
        public IEnumerable<string> Get()
        {
            return new string[] { "value1", "value2" };
        }

        // GET: api/SignIn/5
        //查询今天是否签到
        public SignInDto Get(int id)
        {
            var data = new SignInBll().Query().Where(x => x.Uid == id && x.Sign_Date.Day == DateTime.Now.Day);
            var list = from i in data
                       select new SignInDto
                       {
                           Sid = i.Sid,
                           Sign_Date = i.Sign_Date,
                           Sign_Point = i.Sign_Point,
                           Uid = i.Uid
                       };
            return list.FirstOrDefault();
        }

        // POST: api/SignIn
        //签到积分
        public Result Post([FromBody]int uid)
        {
            Sign_in sign = new Sign_in()
            {
                Uid = uid,
                Sign_Date = DateTime.Now,
                Sign_Point = 10,//默认每次签到积分为10

            };
            bool bol = new SignInBll().Add(sign);
            //修改用户表里面的积分
            var data = new user_infoBll().Query().Where(x => x.user_id == uid).FirstOrDefault();
            data.points += 10;
            new user_infoBll().Update(data);
            Result result = new Result()
            {
                code = bol ? 1 : 0,
                msg=bol?"签到成功!":"签到失败!",
                test=Convert.ToInt32( data.points)
            };
            return result;
        }

        // PUT: api/SignIn/5
        public void Put(int id, [FromBody]string value)
        {
        }

        // DELETE: api/SignIn/5
        public void Delete(int id)
        {
        }
    }
}
*/